﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using WebApplication1.Models;
using WebApplication1.Swagger;

namespace WebApplication1.Controllers
{
    /// <summary>
    /// 测试模块
    /// </summary>
    [ApiExplorerSettings(GroupName = SwaggerGroupingModel.GROUPNAME_TEST)]
    public class TestController : Controller
    {

        /// <summary>
        /// POST请求测试(无参数)
        /// </summary>
        /// <returns></returns>
        [HttpPost("TestPost")]
        public void TestPost()
        {

        }

        /// <summary>
        /// POST请求测试(传参数需要添加[FromBody])
        /// </summary>
        /// <returns></returns>
        [HttpPost("TestPostPra")]
        public PostRequstTestDto TestPostPra([FromBody] PostRequstTestDto pra)
        {
            return pra;
        }

        /// <summary>
        /// POST请求测试(无参数)
        /// </summary>
        /// <returns></returns>
        [HttpGet("TestGet")]
        public void TestGet()
        {

        }

        /// <summary>
        /// Put请求测试
        /// </summary>
        /// <returns></returns>
        [HttpPut("TestPut")]
        public void TestPut()
        {

        }

        /// <summary>
        /// Delete请求测试
        /// </summary>
        /// <returns></returns>
        [HttpDelete("TestDelete")]
        public void TestDelete()
        {

        }
    }
}
